#pragma once


#include <memory>
#include "Containers/Containers.h"
#include "IdentifierDescription.h"
#include "DecoratedTypeDescription.h"

class CFunctionBodyDescription;
class CParameterDescription;
class CTypeDescription;

class CConstructorDescription : public IIdentifierDescription
{

public:
    virtual EIdentifierType GetIdentifierType() const override
    {
        return EIdentifierType::Constructor;
    }

    uint32_t IndexInParent = 0;

    //index in all function array, include constructor and base class functions
    int32_t FunctionIndex = -1;

    bool bAutoGenerated = false;

    //static constructor is used to initialize static member variables
    bool bIsStatic=false;

    TVector<CString> ParentScopeNameChain;
    //CString Name;

    TVector<std::shared_ptr<CParameterDescription>> Parameters;

    TOptional<std::shared_ptr<CFunctionBodyDescription>> Body;

    SDecoratedTypeDescription FunctionPointerType;

    std::weak_ptr<CTypeDescription> ParentClass;
    
    virtual CString GetSearchName() const override
    {
        //cant be searched
        assert(false);
        return U"";
    }
};